﻿@model TumbaloSoft.Models.Edificio
@{
    if (ViewBag.permiso == 2)
    {
        Layout = "~/Views/Shared/_AdministradorEdificiosLayout.cshtml";
    }
    else if (ViewBag.permiso == 3)
    {
        Layout = "~/Views/Shared/_AdministradorGeneralLayout.cshtml";
    }
    else if (ViewBag.permiso == 1)
    {
        Layout = "~/Views/Shared/_PropietarioLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_AdministracionLayout.cshtml";
    }
    ViewBag.Title = "Registrar Edificio";
}

<script>
	$(document).ready(function () {
		$(":file").css("background-color", "lightgray");
		$(":file").css("height", "25px");
		$(":file").css("margin-left", "98px");
	});
</script>
<body id="page5">
<!-- content -->
		<div class="body2">
			<div class="main">
				<section id="content">
					<div class="wrapper">
                        <!--ESTA COLUMNA ES PARA EL MENU DE NAVEGACION DE LA IZQUIERDA QUE HABIA EN LOS MOCKUPS
                            DISCULPEN SI LOS ESTILOS ESTAN MAL NO SE MUCHO CSS-->
                        <article class="col0">
                            <nav class="urbangreymenu">
                                <h3 class="headerbar">Mantenimiento de departamento</h3>
                                    <ul id="subMenu">
                                        <li><h5>@Html.ActionLink("Buscar Edificio","Index")</h5></li>
                                    </ul>
                            </nav>
                        </article>
						<article class="col1">
                            <!--dentro de div pad2 trabajare mi formulario -->
							<div class="pad2">
								<h2 class="pad_bot1 pad_top1">Registrar nuevo edificio</h2>
									
                                   <form id="ContactForm" method="post" encType = "multipart/form-data">

										<div  class="wrapper">
                                            <span><br>Nombre*</span>
											<br>@Html.TextBoxFor(model => model.prNombre, new { maxlength = "255" }) 
                                                @Html.ValidationMessageFor(model => model.prNombre,null ,new{style = "float: none"})
										</div>

                                       <div class="wrapper">
                                            <span>Logo</span>
                                            <br>@Html.TextBoxFor(model => model.prLogo, new { @class="input",type="file",maxlength = "255", placeholder = "Ingresa una imagen aqui"})
                                                @Html.ValidationMessageFor(model => model.prLogo,null ,new{style = "float: none"})
                                       </div>

										<div  class="wrapper">
											<span><br>Dirección*</span>
											<br>@Html.TextBoxFor(model => model.prDireccion) 
                                                @Html.ValidationMessageFor(model => model.prDireccion,null ,new{style = "float: none",maxlength = "255"})
										</div>

                                       <div class="wrapper">
                                           <span><br>Distrito</span>
                                           <br><select id="prDistrito_prIdDistrito"  name="prDistrito.prIdDistrito">
                                               @foreach (var objDistrito in ViewBag.lista)
                                               {
                                                   <option value="@objDistrito.prIdDistrito">@objDistrito.prNombreDistrito</option>
                                               }
                                               </select>
                                       </div>
                                        
                                        <div  class="wrapper">
											<span><br>Número de pisos</span>
											<br>@Html.TextBoxFor(model => model.prNroPisos) 
                                                @Html.ValidationMessageFor(model => model.prNroPisos,null ,new{style = "float: none",maxlength = "10"})
										</div>
                                        
                                        <div  class="wrapper">
											<span><br>Número de departamentos</span>
											<br>@Html.TextBoxFor(model => model.prNroDepartamentos, new {@readonly = "readonly"}) 
                                                @Html.ValidationMessageFor(model => model.prNroDepartamentos,null ,new{style = "float: none"})
										</div>                                       

                                       <div  class="wrapper">
											<span><br>Área(m2)</span>
											<br>@Html.TextBoxFor(model => model.prArea) 
                                                @Html.ValidationMessageFor(model => model.prArea,null ,new{style = "float: none"})
										</div>  
                                       <div  class="wrapper">
											<span><br>Costo de Mantenimiento*</span>
											<br>@Html.TextBoxFor(model => model.prMonto, new { maxlength = "10"}) 
                                                @Html.ValidationMessageFor(model => model.prMonto,null ,new{style = "float: none",maxlength = "10"})
									    </div>
                                       <div  class="wrapper">
											<span><br>Información</span>
											<br>@Html.TextAreaFor(model => model.prInformacion,new {style="max-width:25em;max-height:15ex;",maxlength = "255"}) 
                                                @Html.ValidationMessageFor(model => model.prInformacion,null ,new{style = "float: none"})
										</div> 
                                       <div class="wrapper">
                                                <span><br>Tiene Contómetro</span>
                                                @if (Model != null && Model.prTieneContometro == "1"){
                                                
                                                    <br/><input type="checkbox" name="prTieneContometro" value="1" checked/>
                                               }
                                                else{
                                                    <br/><input type="checkbox" name="prTieneContometro" value="1" />
                                                }
                                        </div>                                     
										<span>&nbsp;</span>
                                       	<a href="#" class="button" onClick="document.getElementById('ContactForm').submit()">Registrar</a>
										<a href="#" class="button" onClick="document.getElementById('ContactForm').reset()">Limpiar</a>
										<a href="javascript:history.go(-1)" class="button" onClick="document.getElementById('ContactForm').cancel()">Cancelar</a>
								
								</form>
                                </div>
								 
							
						</article>
                        </div>
				
				</section>
			</div>
            </div>
		
<!-- / content -->
		
		<script type="text/javascript"> Cufon.now(); </script>

</body>

